var express = require('express');
var bodyParser = require('body-parser')
var app = express();

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));

app.all('*', function (req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
    res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS");
    res.header("X-Powered-By", ' 3.2.1');
    next();
});

// var http = require('http');
// var port = '3001';
// var faye = require('faye');
// var server = http.createServer(app);
// var bayeux = new faye.NodeAdapter({mount: '/event', timeout: 45});

// bayeux.attach(server);
// var client = bayeux.getClient()

// var message = require('./servers/message')
require('./servers/message_server')
// require('./servers/tcp_server')
// require('./servers/mock_client')
// require('./servers/mock_client2')
require('./servers/mock_base')
// require('./routes/index')(app,client);
// message.messageBase(client)
// message.messageRover(client)
// server.listen(port);
